- name: remove unnecessary fedmsg configs
  file:
    path: "{{ item }}"
    state: absent
  with_fileglob:
    - /etc/fedmsg.d/endpoints*
    - /etc/fedmsg.d/relay.py
    - /etc/fedmsg.d/ssl.py

- name: install the MBS config
  template: src="fedmsg.d/mbs.py" dest=/etc/fedmsg.d/

- name: install fedmsg-relay
  dnf: state=latest name=fedmsg-relay

- name: enable fedmsg-relay
  service: name=fedmsg-relay enabled=yes state=started
